import login from './login';

/**
 * QQ登录
 * @param spaceid 当前项目对应的spaceid
 * @param token 根据code获取到的token
 * @param logintype 网站应用：qq_pc 移动应用：qq_phone
 * @example qq_login(code);
 */

export default function qq_login(code: string) {
	return login('qq-login', {
		code
	}) as Promise<{
		_id: string;
		usercode: string;
		user_name: string;
		name_spell: string;
		is_disabled: boolean;
		create_time: number;
		productid: string;
		avatar_path: string;
		avatar_name: string;
		avatar_type: string;
		email: string;
		phone: string;
		last_login_time: number;
		phone_verified: boolean;
		email_verified: boolean;
		is_admin: string;
		code: number;
		msg: string;
		sessionID: string;
	}>;
}
